package cn.sccl.dirms.dev.model;

import cn.sccl.common.exception.BusinessException;
import cn.sccl.common.model.BaseModel;

/**
* 
* 数据库表 t_dev_chart 的实体对象
* Created by liupan on 2017-06-24.
*/
public class Chart extends BaseModel{
/**
*表名
*/
public final static String TABLE_NAME ="t_dev_chart";

    private java.lang.String grsId;//所属图形集id
    private java.lang.String grsNo;//所属图形模板编号
    private java.lang.String chartName;//图形名称
    private java.lang.String chartType;//图形分类：折线图/饼图/仪表盘/页面......
    private java.lang.String wid;//图形宽度
    private java.lang.String hei;//图形高度
    private java.lang.Long idx;//排序
    private java.lang.Long refFlag;//是否自动刷新：y 是 n 否，默认为n
    private java.lang.Long refMs;//刷新频率，单位为毫秒
    private java.lang.Long timePickFlag;//是否显示时间区间选择器
    private java.lang.String remark;//备注信息

    public void setGrsId(java.lang.String grsId){
    this.grsId = grsId;
    }

        public java.lang.String getGrsId(){
    return this.grsId;
    }
    public void setGrsNo(java.lang.String grsNo){
    this.grsNo = grsNo;
    }

        public java.lang.String getGrsNo(){
    return this.grsNo;
    }
    public void setChartName(java.lang.String chartName){
    this.chartName = chartName;
    }

        public java.lang.String getChartName(){
    return this.chartName;
    }
    public void setChartType(java.lang.String chartType){
    this.chartType = chartType;
    }

        public java.lang.String getChartType(){
    return this.chartType;
    }
    public void setWid(java.lang.String wid){
    this.wid = wid;
    }

        public java.lang.String getWid(){
    return this.wid;
    }
    public void setHei(java.lang.String hei){
    this.hei = hei;
    }

        public java.lang.String getHei(){
    return this.hei;
    }
    public void setIdx(java.lang.Long idx){
    this.idx = idx;
    }

        public java.lang.Long getIdx(){
    return this.idx;
    }
    public void setRefFlag(java.lang.Long refFlag){
    this.refFlag = refFlag;
    }

        public java.lang.Long getRefFlag(){
    return this.refFlag;
    }
    public void setRefMs(java.lang.Long refMs){
    this.refMs = refMs;
    }

        public java.lang.Long getRefMs(){
    return this.refMs;
    }
    public void setTimePickFlag(java.lang.Long timePickFlag){
    this.timePickFlag = timePickFlag;
    }

        public java.lang.Long getTimePickFlag(){
    return this.timePickFlag;
    }
    public void setRemark(java.lang.String remark){
    this.remark = remark;
    }

        public java.lang.String getRemark(){
    return this.remark;
    }

/**
* clone一个对象。
* @param cls 需要克隆的对象类型，只能是当前类的子类
* @param
<T>
    * @return
    * @throws IllegalAccessException
    * @throws InstantiationException
    */
    public
    <T extends Chart> T clone(Class
        <T> cls) {
            try {
            T t = cls.newInstance();
            t.setId(this.
            getId());
            t.setGrsId(this.
            getGrsId());
            t.setGrsNo(this.
            getGrsNo());
            t.setChartName(this.
            getChartName());
            t.setChartType(this.
            getChartType());
            t.setWid(this.
            getWid());
            t.setHei(this.
            getHei());
            t.setIdx(this.
            getIdx());
            t.setRefFlag(this.
            getRefFlag());
            t.setRefMs(this.
            getRefMs());
            t.setTimePickFlag(this.
            getTimePickFlag());
            t.setRemark(this.
            getRemark());
            t.setDeleteFlag(this.
            isDeleteFlag());
            t.setUpdateTime(this.
            getUpdateTime());
            t.setCreateTime(this.
            getCreateTime());
            return t;
            } catch (Exception e) {
            e.printStackTrace();
            throw new BusinessException("对象克隆失败，请克隆的目标对象是否具有无参的构造函数。", e.getCause());
            }
            }
            }